package com.adv.io;

import java.io.*;
import java.util.*;

/**
 * 8:输入一个文本文件名,求他有多少行
 * 
 * @author zhaoyang
 */
public class IO_Work08 {

	public static void main(String[] args) throws IOException {
		int count = 0;
		BufferedReader br = new BufferedReader(new FileReader("/Users/zhaoyang/Desktop/67_2.txt"));
		String str = null;
		int k = 0;
		while ((str = br.readLine()) != null) {
			count++;
		}
		br.close();
		System.out.println("此文本有" + count + "行");

	}

}
